using System;
using System.Collections.Generic;

namespace UtilsExtensionsAndHelpers.Utils
{
    public interface IObjectFactory
    {
        TInterface Instance<TInterface>(Type type);
        TInterface Instance<TInterface>();
        IEnumerable<TInterface> InstanceList<TInterface>();

        TInterface New<TInterface>(Type type);
        TInterface New<TInterface>();
        IEnumerable<TInterface> NewList<TInterface>();
        
        void Bind<TInterface>(Func<Object> constructor);
        void Bind(Type type, Func<Object> constructor);
        //void BindFileBackedPersistable<TInterface>(Func<Object> constructor, string filePath, int refreshRateInMinutes);
        //void BindFileBackedPersistable(Type type, Func<Object> constructor, string filePath, int refreshRateInMinutes);
    }
}